package org.suk.dp.memento;

/**
 * Description: 客户端<br/>
 * @version V1.0  2017/6/21 13:22  by 石冬冬(dongdong.shi@ucarinc.com) - Heil Hitler
 */
public class Client {
    public static void main(String[] args) {
        Originator originator = new Originator();
        originator.setState("On");
        originator.show();

        Caretaker caretaker = new Caretaker();
        caretaker.setMemento(originator.createMemento());

        originator.setState("Off");
        originator.show();

        originator.setMemento(caretaker.getMemento());
        originator.show();
    }
}
